/*
 * Filename:    HcpmsFontUtil.java
 * Copyright:   2014 中国平安保险（集团）股份有限公司 版权所有
 * Company:     平安科技养老险及健康险系统开发部
 * Create at:   2014年12月6日
 */
package com.paic.mhis.hcpms.itextpdf.web.util;

import java.io.IOException;

import com.itextpdf.text.DocumentException;
import com.itextpdf.text.Font;
import com.itextpdf.text.pdf.BaseFont;

public class HcpmsFontUtil {

	public static Font createTitleFont(int fontSize, int bold) {
		Font font = new Font();
		try {
			BaseFont base = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.EMBEDDED);
			font = new Font(base, fontSize, bold);
		} catch (DocumentException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return font;
	}

	public static Font createTextFont(int fontSize, int bold) {
		Font font = new Font();
		try {
			BaseFont base = BaseFont.createFont("STSong-Light", "UniGB-UCS2-H", BaseFont.EMBEDDED);
			font = new Font(base, fontSize, bold);
		} catch (DocumentException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return font;
	}

	public static Font createTextFontV(int fontSize, int bold) {
		Font font = new Font();
		try {
			BaseFont base = BaseFont.createFont("STSong-Light", "UniGB-UCS2-V", BaseFont.NOT_EMBEDDED);
			font = new Font(base, fontSize, bold);
		} catch (DocumentException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return font;
	}
}
